﻿#ifndef BASEITEM_H
#define BASEITEM_H
#include <QObject>
#include <QJsonObject>
#include <QJsonDocument>
#include <QException>
#include <QSharedPointer>
#include <QDebug>
#include "myhead.h"
#include "InterruptedException.h"

class BaseItem : public QObject
{
    Q_OBJECT
public:
    explicit BaseItem(QObject *parent = nullptr);

    QString name();
    void setName(QString name);

    virtual void setConfig(QJsonObject obj);
    virtual QJsonObject config();

    virtual void setOtherConfig(QJsonObject other);

    virtual bool init();

    virtual QWidget* getConfigWidget();

protected:
    QString _name;
    QJsonObject _obj;
    QJsonObject _other;

signals:

public slots:
};

#endif // BASEITEM_H
